package inabit.inabitcompiler.productions.rule;

import inabit.compiler.parser.grammar.NonTerminal;
import inabit.compiler.parser.grammar.Production;
import inabit.compiler.parser.grammar.Symbol;
import inabit.compiler.parser.grammar.Terminal;
import inabit.inabitcompiler.lexical.InabitTokenClass;

/**Rule -> RULES: RR'*/
/**@author Rafael Rocha*/
public class Rule_Rule extends Production{
	private NonTerminal R;
	private NonTerminal R1;

	public Rule_Rule() {
		super("Rule");
	}

	@Override
	protected Symbol[] production(NonTerminal nonTerminal) {
		R = new NonTerminal("R");
		R1 = new NonTerminal("R'");
		
		Symbol[] symbols = {
				new Terminal(InabitTokenClass.RULE_DEF),
				new Terminal(InabitTokenClass.COLON),
				R,
				R1
		};
		return symbols;
	}

}
